package com.link2room.aeriabots.dto.param.inside;

import com.link2room.common.dto.param.base.BaseL2rParamDto;
import com.link2room.common.util.StringUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * Created by LN on 2016/10/10.
 */
@ApiModel
public class WxQrcodeInsideParamDto extends BaseL2rParamDto {
    @ApiModelProperty(value="唯一编号",required = true)
    private String key;
    @ApiModelProperty(value="类型",required = true)
    private String type;

    public static String getScenStr(String type ,String key ){
        return type+"|"+ key;
    }
    public String getScenStr(){
        return this.type+"|"+this.key;
    }
    public static  String splitToGetKey(String scenStr){
        if(StringUtil.isNotBlank(scenStr)){
            return scenStr.split("\\|")[1];
        }else{
            return null;
        }
    }


    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

}
